package 原型模式;

import java.io.Serializable;

public class Demo implements Cloneable,Serializable {

    private static final long serialVersionUID = -891961051527223363L;
    private String demoName;

    public Demo() {
    }

    public String getDemoName() {
        return demoName;
    }

    public void setDemoName(String demoName) {
        this.demoName = demoName;
    }

    @Override
    public String toString() {
        return "Demo{" +
                "["+this.hashCode()+"]"+
                "demoName='" + demoName + '\'' +
                '}';
    }

    @Override
    protected Demo clone() throws CloneNotSupportedException {
        return (Demo)super.clone();
    }
}
